<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends AdminController {
    public function index(){
        // 获得左侧菜单
//        dump($this['Menu']->getMenus());
        $this->assign('__MENU__', $this['Menu']->getMenus());
//        dump($this['Category']->getTree());
        // 获得内容分类菜单
        $this->assign('category_tree',$this['Category']->getTree());

        // 显示后台页面框架(基于iframe)
        $this->display('Common/base');
    }

    public function dashboard(){

        $this->display('Index/dashboard');
    }

    public function category_tree($tree){
        if ( $tree ){
            $this->assign('tree',$tree);
            $this->display('Common/category_tree');
        }
    }
}